/*
 * Copyright (c) 2006-2021, RT-Thread Development Team
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 * 2024-05-30     Dell       the first version
 */
#ifndef APPLICATIONS_MOTOR_MOTOR_H_
#define APPLICATIONS_MOTOR_MOTOR_H_

#include <rtthread.h>

#define MOTOR_DEVICE_NAME "pwm2" /* PWM设备名字 */
#define MOTOR_PWM_CHANNEL 2 /* PWM使用通道 */
#define MOTOR_PERIOD 20000000 /* PWM周期 */
#define MOTOR_BEGIN_PURLSE 500000   /*PWM开始的占比*/
#define MOTOR_PURLSE_STEP 100000   /*PWM每次变化的步长*/
#define MOTOR_MIN_PURLSE 500000   /*PWM占比最小值*/
#define MOTOR_MAX_PURLSE 2500000   /*PWM占比最大值*/
/***
 * 初始化舵机设备
 */
void motor_init();


#endif /* APPLICATIONS_MOTOR_MOTOR_H_ */
